/*
	Title: 01_Figure6.do
	Paper: Brauning, Ivashina, Ozdagli (2025)
	Description: Figure 6 - Robustness to thresholds for discontinuity sample
*/

/*------------------------------------------------------------------------------
								  Figure 6
------------------------------------------------------------------------------*/
// Import Figure 6 data
use "$data_path/Figure6.dta", clear

// Create Figure 6
twoway (rbar up95 lo95 sample_enc if !flag_opt, color(gray%40) lcolor(gray%40) lwidth(none)) ///
	   (rbar up95 lo95 sample_enc if flag_opt, color(red%40) lcolor(red%40) lwidth(none)) ///
	   (scatter estimate sample_enc, mcolor(black) mlabel(N) mlabcolor(black) mlabposition(12) mlabsize(small)), ///
	    xlabel(1(1)12, valuelabel) ///
		yline(0, lcolor(black%50) lpattern(dash)) ///
	    xtitle(" " "Bandwidth") ///
		ytitle("Estimate" " ") ///
		legend(off) ///
		graphregion(color(white)) ///
		name(Figure6, replace)
		
graph export "$figures_path/Figure6.png", replace 		